package org.lds.logger;

import org.lds.logger.config.level.Level;

public abstract class AbstractLogger implements Logger {

    public void debug(String message) {
        log(Level.DEBUG, message);
    }
    public void debug(String message, Throwable e) {
        log(Level.DEBUG, message, e);
    }


    public void info(String message) {
        log(Level.INFO, message);
    }
    public void info(String message, Throwable e) {
        log(Level.INFO, message, e);
    }


    public void warn(String message) {
        log(Level.WARN, message);
    }
    public void warn(String message, Throwable e) {
        log(Level.WARN, message, e);
    }


    public void error(String message) {
        log(Level.ERROR, message);
    }
    public void error(String message, Throwable e) {
        log(Level.ERROR, message, e);
    }

    protected void log(Level level, String message) {

    }

    protected void log(Level level, String message, Throwable e) {
        log(level, message);
        e.printStackTrace();
    }

}
